<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>

<!--<script src="./Template/burndownchart/libraries/RGraph.common.core.js" ></script>
<script src="./Template/burndownchart/libraries/RGraph.line.js" ></script>-->
<h:outputScript library="bdc" name="RGraph.common.core.js" target="head"/>
<h:outputScript library="bdc" name="RGraph.line.js" target="head"/>

        <!--[if lt IE 9]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
        
       <script>
           var renderChart = function(){
                var line1 = new RGraph.Line('line1', [50,48,36,34,33,21,18,12,11,7,4,0]);
            line1.Set('chart.background.grid', true);
            line1.Set('chart.linewidth', 5);
            line1.Set('chart.gutter.left', 35);
            line1.Set('chart.hmargin', 5);

            if (!document.all || RGraph.isIE9up()) {
                line1.Set('chart.shadow', true);
            }
            line1.Set('chart.tickmarks', null);
            line1.Set('chart.units.post', 'h');
            line1.Set('chart.colors', ['red', 'green']);
            line1.Set('chart.background.grid.autofit', true);
            line1.Set('chart.background.grid.autofit.numhlines', 10);
            line1.Set('chart.curvy', 1);
            line1.Set('chart.curvy.factor', 0.25);
            //line1.Set('chart.labels',['01','02','03','04','05','06','07','08','09','10','11','12','13']);
            line1.Set('chart.title','Sprint Burndown');
            
            line1.Draw();
           }
           
        window.onload = function ()
        {
            renderChart();
        }
    </script>

        <script>
          var _gaq = _gaq || [];
          _gaq.push(['_setAccount', 'UA-54706-2']);
          _gaq.push(['_trackPageview']);
        
          (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
          })();
        </script>
    
    </h:head>
    <h:body>
      
        <script>
    // Opera fix
    if (navigator.userAgent.indexOf('Opera') == -1) {
      document.getElementById("social_icons").style.position = 'fixed';
    }
</script>
            <script>
        if (RGraph.isOld()) {
            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag.</div>');
        }
    </script>
        
        <h:form>
            Projekt : 
            <h:selectOneMenu>
                <f:selectItems value="#{scrumprojektController.itemsAvailableSelectOne}"/>
            </h:selectOneMenu> 
            Sprint : 
            <h:selectOneMenu>
                <f:selectItems value="#{sprintController.itemsAvailableSelectOne}"/>
            </h:selectOneMenu> 
            <a4j:commandButton value="Anzeigen" render="chart" onclick="renderChart()"/>
        </h:form>
        <br/>
<a4j:outputPanel id="chart">
            <canvas id="line1" width="600" height="300">[Please wait...]</canvas>
        </a4j:outputPanel>
        <br/>
        <rich:dataTable>
            <rich:column> Test</rich:column>
        </rich:dataTable>
        
    </h:body>
</html>

